#ifndef SKELETON_H_
#define SKELETON_H_

#include "Bone.h"
#include "SkeletonAnimationManager.h"
#include "BoneOrientationNode.h"
#include "Vector2D.h"
#include "TextureManager.h"

class Skeleton
{
	TextureManager * textureManager;
	Bone * head;
	SkeletonAnimationManager * skeletonAnimationManager;
	float angleAmplitudeModifier;
	float lengthAmplitudeModifier;
	float timeAmplitudeModifier;
	Vector2D size;
	float rotation;
	bool facingRight;
	
	public:
	Skeleton();
	Skeleton(TextureManager * textureManager, char * fileName);
	~Skeleton();
	
	void SetDirection(bool facingRight);
	void Rotate(float rotation);
	void RadianRotate(float rotation);
	bool LoadFromFile(char * fileName);

	void SetAnimation(char * animationName, float angleAmplitudeModifier, 
                  	  float lengthAmplitudeModifier, float timeModifier);
    
	void Think(double elapsedTime);
	void Draw(Vector2D position);
	void SetDesiredPose(BoneOrientationNode * desiredPose);
	void SetTimeModifier(float timeModifier);
};
#endif /*SKELETON_H_*/
